package getFromDBMethods;

import java.util.ArrayList;

import org.json.JSONException;

import ServletProcess.AllMessages;
import Storage.Message;

public class getAllMessages {
	public static ArrayList<Message> process(String msgRequest)
			throws JSONException {
		ArrayList<Message> buddylist = new ArrayList<Message>();
		String messagelistJson = AllMessages.process(msgRequest);
		// Reverse ArrayList.toString
		if (!messagelistJson.equals("[]")) {
			buddylist = JsonProcess.jAllMessages.process(messagelistJson);
		}
		return buddylist;
	}
}
